<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" th:fragment="tale_comment" >
<body>
<script type="text/javascript">
    /*<![CDATA[*/
    (function () {
        window.TaleComment = {
            subComment: function () {

                    $.post(
                    '/user/publishComment',
                    $('#comment-form').serialize(),
                    function (data) {
                        if (data == "OK") {
                            alert("发布成功！");
                        }
                        else{
                            alert("发布失败！");
                        }
                        window.location.reload();
                    }
                );

                return false;
            }
        };
    })();
</script>
</body>
</html>